home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
U-Utilities
/
(c)u2.d64
/
dos.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
2KB
|
92 lines
5 POKE53280,2:POKE53281,15:PRINT"[144]"
10 PRINT"[147]":PRINT:PRINT
20 PRINTTAB(10);"DISK USER MENU"
30 PRINT"[191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][144]"
40 PRINT
50 PRINT" 1.DISK DIRECTORY"
60 PRINT" 2.FORMAT NEW DISK"
70 PRINT" 3.INITIALIZE DISK"
80 PRINT" 4.COPY FILE"
90 PRINT" 5.RENAME FILE"
100 PRINT" 6.ERASE FILE(S)"
110 PRINT" 7.VALIDATE FILES"
120 PRINT" 8.WRITE MENU FILE"
130 PRINT" 9.ERROR STATUS"
140 PRINT" 10.EXIT TO BASIC"
150 PRINT
160 PRINT"[191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][144]"
170 PRINT"INPUT YOUR CHOICE,HIT RETURN"
180 PRINT
190 INPUT CHOICE
200 ON CHOICEGOSUB250,300,350,400,450,500,550,600,650,700
210 GOTO10
250 PRINT"[147]"
251 OPEN1,8,0,"$"
252 GET#1,A$,B$
254 GET#1,A$,B$
256 GET#1,A$,B$
258 C=0:IFA$<>""THENC=ASC(A$)
260 IFB$<>""THENC=C+ASC(B$)*256
262 PRINTMID$(STR$(C),2);TAB(3);
264 GET#1,B$:IFST<>0THEN282
266 IFB$<>CHR$(34)THEN264
268 GET#1,B$:IFB$<>CHR$(34)THENPRINTB$;:GOTO268
270 GET#1,B$:IFB$=CHR$(32)THEN270
272 PRINTTAB(30);:C$=""
274 C$=C$+B$:GET#1,B$:IFB$<>""THEN274
276 PRINTLEFT$(C$,3)
280 IFST=0THEN254
282 PRINT" BLOCKS FREE"
284 CLOSE1:PRINT:PRINT"HIT RETURN FOR MENU":INPUTX$:RETURN
300 PRINT"[147]":PRINT:PRINT
305 PRINT"INSERT DISK TO BE FORMATTED":PRINT
310 PRINT"INPUT DISK NAME":INPUT DISK$
320 PRINT:PRINT"INPUT EXTENDER NAME":INPUT EXT$
325 MACRO$="N:"+DISK$+","+EXT$
330 OPEN15,8,15,MACRO$
340 CLOSE15:MACRO$="":RETURN
350 PRINT"[147]":PRINT:PRINT
360 PRINT"INSERT DISK TO BE INITIALIZED":PRINT
370 PRINT"HIT RETURN TO INITIALIZE":INPUTX$
380 OPEN15,8,15,"I"
390 CLOSE15:RETURN
400 PRINT"[147]":PRINT:PRINT
410 PRINT"INPUT SOURCE FILE NAME":INPUT DISK$
420 PRINT:PRINT"INPUT NEW FILE NAME":INPUT NWS$
425 MACRO$="C:"+NWS$+"="+DISK$
430 OPEN15,8,15,MACRO$
440 CLOSE15:MACRO$="":RETURN
450 PRINT"[147]":PRINT:PRINT
460 PRINT"INPUT OLD FILE NAME":INPUT DISK$
470 PRINT:PRINT"INPUT NEW FILE NAME":INPUT NWS$
475 MACRO$="R:"+NWS$+"="+DISK$
480 OPEN15,8,15,MACRO$
490 CLOSE15:MACRO$="":RETURN
500 PRINT"[147]":PRINT:PRINT
510 PRINT"INPUT FILE NAMES TO DELETE":INPUT DISK$
520 PRINT:PRINT:PRINT"HIT RETURN TO DELETE":INPUTX$
530 MACRO$="S:"+DISK$
535 OPEN15,8,15,MACRO$
540 CLOSE15:MACRO$="":RETURN
550 PRINT"[147]":PRINT:PRINT
560 PRINT"WARNING!! OPEN FILES WILL BE DELETED"
570 PRINT:PRINT:PRINT"HIT RETURN TO VALIDATE":INPUTX$
580 OPEN1,8,15,"V"
590 CLOSE1:RETURN
600 PRINT"[147]":PRINT:PRINT
610 PRINT"INSERT DISK TO BE WRITTEN TO":PRINT
620 PRINT:PRINT:PRINT"HIT RETURN TO WRITE MENU FILE":INPUTX$
625 OPEN1,8,15
630 SAVE"MENU",8
635 CLOSE1
640 RETURN
650 OPEN1,8,15
660 INPUT#1,A,B$,C,D
670 PRINT"[147]":PRINT:PRINT
680 PRINT"ERROR STATUS":PRINT:PRINT"ERROR# ";A:PRINTB$:PRINT"TRACK ";C,"SECTOR ";D
685 PRINT:PRINT"0=NO ERROR"
690 PRINT:PRINT:PRINT"HIT RETURN FOR MENU":INPUTX$:CLOSE1:RETURN
700 PRINT"[147]":PRINT:PRINT
710 PRINT"NOTE: MENU PROGRAM IS STILL PRESENT"
720 END